USE [DefualtDatabase]
GO

/****** Object:  Table [dbo].[LockDetailLog]    Script Date: 03/22/2016 22:34:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[LockDetailLog](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[MainID] [int] NOT NULL,
	[GxjyID] [int] NOT NULL,
	[OriginalGxjy] [int] NOT NULL,
	[OriginalBz] [varchar](255) NULL,
	[SN] [varchar](50) NULL,
	[ChipSN] [varchar](50) NULL,
	[Unlock] [bit] NOT NULL,
	[UnlockOperator] [varchar](20) NULL,
	[UnlockTime] [datetime] NULL,
	[UnlockReason] [varchar](255) NULL,
 CONSTRAINT [PK_LockDetailLog] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[LockDetailLog] ADD  CONSTRAINT [DF_LockDetailLog_Unlock]  DEFAULT ((0)) FOR [Unlock]
GO


